<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
include('utils.php');
$sql = "select m.*, d.adspacetype,d.adSize, d.noOfTextAd, d.fontType, d.backgroundColor, 
        d.headerColor, d.bodyColor, d.hide_link, d.thumbOrientation, d.headerFontType, d.bodyFontType
        from adspace_master m
        inner join (select * from adspace_details) d
        on m.adspaceid = d.adspaceid
        where m.userid='7' and m.adspaceid='".$_REQUEST['id']."'";
        $recAd = mysql_fetch_array(mysql_query($sql));
?>
<input type="hidden" id="ad_type" value="<?php echo $recAd['adspacetype']; ?>" />
<?php
if($recAd['adspacetype']=='text'){
?>
<td width="450" valign="top">
    <input type="hidden" id="ad_Size" value="<?php echo $recAd['adSize']; ?>" />
    <input type="hidden" id="ad_No" value="<?php echo $recAd['noOfTextAd']; ?>" />
    <input type="hidden" id="ad_fontType" value="<?php echo $recAd['fontType']; ?>" />
    <input type="hidden" id="ad_bgColor" value="<?php echo $recAd['backgroundColor']; ?>" />
    <input type="hidden" id="ad_hdColor" value="<?php echo $recAd['headerColor']; ?>" />
    <input type="hidden" id="ad_bdColor" value="<?php echo $recAd['bodyColor']; ?>" />
    <input type="hidden" id="ad_hidelink" value="<?php echo $recAd['hide_link']; ?>" />
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td class="admob-SquareBoxTilteBg">Ad Space Characteristics</td>
    </tr>
    <tr>
        <td class="admob-SquareBoxBorder">
        <table width="100%" border="0" cellpadding="0" cellspacing="2" class="admob-FormContent">
        <tr>
            <td width="150" height="25">Ad Space Type:</td>
            <td>
            <select id="adspaceType" name="adspace_type" disabled class="admob-CustomizeSmallDropDown">
                <option value="text" selected="selected">text</option>
            </select>
            </td>
        </tr>
        <script type="text/javascript" language="javascript" src="selling-basic-adspace-add_files/js.html"></script>
        <script type="text/javascript" language="javascript" src="selling-basic-adspace-add_files/form.js"></script>
        <tr>
        <td height="25">#Ads:</td>
        <td>
            <select id="cellCount" name="cell_count" class="admob-CustomizeDropDown" onChange="javascript: preview();">
            <option label="1" value="1" selected="selected">1</option>
            <option label="2" value="2">2</option>
            <option label="3" value="3">3</option>
            <option label="4" value="4">4</option>
            <option label="5" value="5">5</option>
            <option label="6" value="6">6</option>
            <option label="7" value="7">7</option>
            <option label="8" value="8">8</option>
            <option label="9" value="9">9</option>
            <option label="10" value="10">10</option>
            <option label="11" value="11">11</option>
            <option label="12" value="12">12</option>
            <option label="13" value="13">13</option>
            <option label="14" value="14">14</option>
            <option label="15" value="15">15</option>
            <option label="16" value="16">16</option>
            <option label="17" value="17">17</option>
            <option label="18" value="18">18</option>
            <option label="19" value="19">19</option>
            <option label="20" value="20">20</option>
            </select>
        </td>
        </tr>
        <tr>
            <td height="40%">View:</td>
            <td>
                <div id="horizontalView"><input id="horizontal" name="alignment" value="horizontal" onClick="javascript: preview();" type="radio"><label for="horizontal">Horizontal</label></div>
                <div id="verticalView"><input id="vertical" name="alignment" value="vertical" checked="checked" onClick="javascript: preview();" type="radio"><label for="vertical">Vertical</label></div>
            </td>
        </tr>
        <tr>
            <td height="25%">Standard Size:</td>
            <td>
            <select id="size" name="size" class="admob-CustomizeLargeDropDown" onChange="javascript: if('160x100'==this.value)restoreDefaultSize();else preview();">
            <option label="None" value="160x100" selected="selected">None</option>
            <option label="Standard Rectangle (184 x 360)" value="184x360">Standard Rectangle (184 x 360)</option>
            <option label="Full Banner (468 x 60)" value="468x60">Full Banner (468 x 60)</option>
            <option label="Half Banner (234 x 60)" value="234x60">Half Banner (234 x 60)</option>
            <option label="Leader Board (728 x 90)" value="728x90">Leader Board (728 x 90)</option>
            <option label="Square Button (125 x 125)" value="125x125">Square Button (125 x 125)</option>
            <option label="Vertical Banner (120 x 240)" value="120x240">Vertical Banner (120 x 240)</option>
            <option label="Small Rectangle (180 x 150)" value="180x150">Small Rectangle (180 x 150)</option>
            <option label="Medium Rectangle (300 x 250)" value="300x250">Medium Rectangle (300 x 250)</option>
            <option label="Large Rectangle (336 x 280)" value="336x280">Large Rectangle (336 x 280)</option>
            <option label="Square Pop-up (250 x 250)" value="250x250">Square Pop-up (250 x 250)</option>
            <option label="Skyscraper (120 x 600)" value="120x600">Skyscraper (120 x 600)</option>
            <option label="Wide Skyscraper (160 x 600)" value="160x600">Wide Skyscraper (160 x 600)</option>
            </select>
            </td>
        </tr>
        <tr>
            <td height="25%">Font Type:</td>
            <td>
            <select id="fontType" name="font_type" class="admob-CustomizeDropDownBig" onChange="javascript: preview();">
            <option label="Arial" value="Arial" selected="selected">Arial</option>
            <option label="Georgia" value="Georgia">Georgia</option>
            <option label="Sans-serif" value="MS Sans Serif">Sans-serif</option>
            <option label="Times" value="Times">Times</option>
            <option label="Verdana" value="Verdana">Verdana</option>
            </select>
            </td>
        </tr>
        <tr>
            <td height="25%">Background Color:</td>
            <td>
            <input id="backgroundColor" name="background_color" class="admob-CustomizeInputBox" size="10" maxlength="11" value="#E8E8E8" onChange="javascript: commonPreview(preview);" type="text">
            <a class="colorformat">Background Color</a>
            <img style="cursor: pointer; padding-left: 3px;" id="cImgBG" src="images/palette.gif" alt="Palette" onClick="javascript: onClickPalette('backgroundColor', this, true);">
            </td>
        </tr>
        <tr>
            <td height="25%">Headline Color:</td>
            <td>
            <input id="titleColor" name="title_color" class="admob-CustomizeInputBox" size="10" maxlength="10" value="#0000FF" onChange="javascript: commonPreview(preview);" type="text"><a class="colorformat">Headline Color</a><img style="cursor: pointer; padding-left: 3px;" src="images/palette.gif" alt="Palette" onClick="javascript: onClickPalette('titleColor', this);">
            </td>
        </tr>
        <tr>
            <td height="25%">Description Color:</td>
            <td>
            <input id="descriptionColor" name="description_color" class="admob-CustomizeInputBox" size="10" maxlength="10" value="#000000" onChange="javascript: commonPreview(preview);" type="text"><a class="colorformat">Description Color</a><img style="cursor: pointer; padding-left: 3px;" src="images/palette.gif" alt="Palette" onClick="javascript: onClickPalette('descriptionColor', this);">
            </td>
        </tr>
    <tr>
        <td height="25%">Hide Broker Link:</td>
        <td>
            <select id="brokerLinkHide" name="broker_link_hide" class="admob-CustomizeDropDown" onChange="javascript: hideBrokerLink(); preview();">
            <option value="N" selected="selected">No</option>
            <option value="Y">Yes</option>
            </select><br />
            <a href="javascript: restoreDefault();" class="admob-RightLink">restore defaults</a></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>
    <tr>
    <td height="25">&nbsp;</td>
    <td>
        <table border="0" align="left" cellpadding="0" cellspacing="0">
        <tr>
            <td>
                <input name="next" value="Save" class="admob-InputButton" onClick="javascript: return validateSite(); " type="submit"></td>
        </tr>
        </table>
    </td>
    </tr>
    </table>
</td>
</tr>
</table>
</td>
<td width="13" valign="top">&nbsp;</td>
<!--##################-->
<!--BEGIN Preview Form-->
<td width="450" valign="top">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td class="admob-SquareBoxTilteBg">Preview</td>
    </tr>
    <tr>
        <td class="admob-SquareBoxBorder"><table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td>
        <div style="padding: 3px; text-align: left;">
        <table cellpadding="0" cellspacing="0">
        <tbody>
        <tr id="pTr">
            <td id="pTd">
                <table style="width: 640px; height: 79px; table-layout: fixed;" border="0" cellpadding="6" cellspacing="6">
                <tbody>
                <!--<tr><td align="center" bgcolor="#ff8080" valign="top"><div style="overflow: hidden; width: 141px; height: 55px;" id="ad_0"><div style="color: rgb(0, 0, 255); font-family: Arial; font-size: 13px; font-weight: bold; text-decoration: underline;">Headline Goes Here</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 13px;">Ad description will go ...</div></div></td><td align="center" bgcolor="#ff8080" valign="top"><div style="overflow: hidden; width: 141px; height: 55px;" id="ad_1"><div style="color: rgb(0, 0, 255); font-family: Arial; font-size: 13px; font-weight: bold; text-decoration: underline;">Headline Goes Here</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 13px;">Ad description will go ...</div></div></td><td align="center" bgcolor="#ff8080" valign="top"><div style="overflow: hidden; width: 141px; height: 55px;" id="ad_2"><div style="color: rgb(0, 0, 255); font-family: Arial; font-size: 13px; font-weight: bold; text-decoration: underline;">Headline Goes Here</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 13px;">Ad description will go ...</div></div></td><td align="center" bgcolor="#ff8080" valign="top"><div style="overflow: hidden; width: 141px; height: 55px;" id="ad_3"><div style="color: rgb(0, 0, 255); font-family: Arial; font-size: 13px; font-weight: bold; text-decoration: underline;">Headline Goes Here</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 13px;">Ad description will go ...</div></div></td></tr>-->
                </tbody>
                </table>
            </td>
        </tr>
        <tr>
            <td style="text-align: left; height: 15px;">
                <div id="brokerLink" style="border-width: 0px; display: inline; font-size: 11px; font-family: arial; color: rgb(0, 0, 0); text-decoration: none; font-weight: normal; font-style: normal;"><a href="#" class="admob-RightLink"><span id="brokerLinkSpan">Advertise Here</span></a></div>
            </td>
        </tr>
        </tbody>
        </table>
        </div>
    </td>
    </tr>
    </tbody></table>
    </td>
    </tr>
    </tbody></table>
</td>
<!--END Preview Form-->
<!--##################-->
<?php
}
if($recAd['adspacetype']=='banner'){
?>
<!--FOR BANNERRRRRRRRRRRRRRRRRRRR-->
<td style="width: 50%;">
<input type="hidden" id="ad_Size" value="<?php echo $recAd['adSize']; ?>" />
<input type="hidden" id="ad_bgColor" value="<?php echo $recAd['backgroundColor']; ?>" />
<input type="hidden" id="ad_hdColor" value="<?php echo $recAd['headerColor']; ?>" />
<input type="hidden" id="ad_bdColor" value="<?php echo $recAd['bodyColor']; ?>" />
<input type="hidden" id="ad_headFont" value="<?php echo $recAd['headerFontType']; ?>" />
<input type="hidden" id="ad_bodyFont" value="<?php echo $recAd['bodyFontType']; ?>" />
<table style="background-color: rgb(153, 153, 153); width: 100%;" cellpadding="3" cellspacing="1" class="mainTable">
<tbody>
<tr>
<td style="text-align: left; color: rgb(255, 255, 255); font-weight: bold;" class="sitename">Ad Space Characteristics</td>
</tr>
<tr style="background-color: rgb(251, 251, 251);">
<td>
<div style="padding: 3px; text-align: left;">
<table style="text-align: left;"  align="center" width="100%">
  <tbody>
    <tr>
      <td colspan="2" class="blackbold" style="text-align: left;">Ad Space Type:
        <select id="adspaceType" name="adspace_type" disabled class="admob-CustomizeSmallDropDown">
            <option value="banner" selected="selected">banner</option>
        </select>
      </td>
    </tr>
    <tr>
        <td colspan="2" style="padding-top: 5px; padding-bottom: 5px;"><hr></td>
    </tr>
    <tr>
      <td>Size:</td>
      <td>
          <select id="sizeB" name="size" onChange="javascrip: previewB();window.changed = true;">
          <option label="Vertical Banner (120 x 240)" value="120x240">Vertical Banner (120 x 240)</option>
          <option label="Mini Skyscraper(120 x 400)" value="120x400">Mini Skyscraper(120 x 400)</option>
          <option label="Skyscraper (120 x 600)" value="120x600">Skyscraper (120 x 600)</option>
          <option label="Square Button (125 x 125)" value="125x125">Square Button (125 x 125)</option>
          <option label="Wide Skyscraper1 (150 x 600)" value="150x600">Wide Skyscraper1 (150 x 600)</option>
          <option label="Wide Skyscraper2 (160 x 600)" value="160x600">Wide Skyscraper2 (160 x 600)</option>
          <option label="Wide Skyscraper3 (200 x 480)" value="200x480">Wide Skyscraper3 (200 x 480)</option>
          <option label="Square (250 x 250)" value="250x250">Square (250 x 250)</option>
          <option label="Medium Rectangle (300 x 250)" value="300x250">Medium Rectangle (300 x 250)</option>
          <option label="Medium Rectangle 2 (300 x 210)" value="300x210">Medium Rectangle 2 (300 x 210)</option>
          <option label="Medium Rectangle 3 (400 x 250)" value="400x250">Medium Rectangle 3 (400 x 250)</option>
          <option label="Full Banner (468 x 60)" value="468x60">Full Banner (468 x 60)</option>
          <option label="Leader Board (728 x 90)" value="728x90">Leader Board (728 x 90)</option>
          <option label="Large Leader Board (728 x 300)" value="728x300">Large Leader Board (728 x 300)</option>
          <option label="Large Leader Board 2 (768 x 245)" value="768x245">Large Leader Board 2 (768 x 245)</option>
          </select>
      </td>
    </tr>
<tr>
  <td colspan="2"><div style="font-weight: bold; color: rgb(0, 0, 0);">Template Appearance</div></td>
</tr>
<tr>
  <td colspan="2"><input id="use_template" name="template_setting" value="off" onClick="setTemplateAppearance(false);" checked="true" type="radio">
    <label for="use_template">Use Template Setting</label></td>
</tr>
<tr>
  <td colspan="2"><input id="config_appearance" name="template_setting" value="on" onClick="setTemplateAppearance(true);" type="radio">
    <label for="config_appearance">Configure Appearance</label></td>
</tr>
</tbody>
</table>
<table id="configAppearanceTable" style="width: 330px; display: none;">
<tbody>
<tr>
  <td style="width: 25%;">Background Color:</td>
  <td><input id="backgroundColor" name="background_color" class="admob-CustomizeInputBox" size="10" maxlength="10" value="" onChange="window.changed = true;changeStyle('color', this, 'previewBackgroundColor');" type="text">
    <img style="cursor: pointer; padding-left: 3px;" src="images/palette.gif" alt="label_text_palette" onClick="javascript: onClickPalette('backgroundColor', this, false);"></td>
  <td><div id="previewBackgroundColor" style="height: 18px;">Background Color</div></td>
</tr>
<tr>
  <td colspan="3">Header:</td>
</tr>
<tr>
  <td style="padding-left: 20px;">Font Type:</td>
  <td colspan="2"><select id="headerFontType" class="flat" name="header_font_type" onChange="window.changed = true;changeStyle('fontType', this, 'previewHeaderStyle');">
      <option label="Arial" value="Arial">Arial</option>
      <option label="Georgia" value="Georgia">Georgia</option>
      <option label="Sans-serif" value="MS Sans Serif">Sans-serif</option>
      <option label="Times" value="Times">Times</option>
      <option label="Verdana" value="Verdana">Verdana</option>
    </select></td>
</tr>
<tr>
  <td style="padding-left: 20px;">Color:</td>
  <td><input id="headerColor" name="header_bg_color" class="admob-CustomizeInputBox" size="10" maxlength="10" value="" onChange="window.changed = true;changeStyle('color', this, 'previewHeaderStyle');" type="text">
  <img style="cursor: pointer; padding-left: 3px;" src="images/palette.gif" alt="label_text_palette" onClick="onClickPalette('headerColor', this, false);"></td>
  <td><div id="previewHeaderStyle" style="height: 18px; padding-left: 5px; font-family: arial;">Header Sample</div></td>
</tr>
<tr>
  <td colspan="3">Body:</td>
</tr>
<tr>
  <td style="padding-left: 20px;">Font Type:</td>
  <td colspan="2"><select id="bodyFontType" class="flat" name="body_font_type" onChange="window.changed = true;changeStyle('fontType', this, 'previewBodyStyle');">
      <option label="Arial" value="Arial">Arial</option>
      <option label="Georgia" value="Georgia">Georgia</option>
      <option label="Sans-serif" value="MS Sans Serif">Sans-serif</option>
      <option label="Times" value="Times">Times</option>
      <option label="Verdana" value="Verdana">Verdana</option>
    </select></td>
</tr>
<tr>
  <td style="padding-left: 20px;">Color:</td>
  <td><input id="bodyColor" name="body_bg_color" class="admob-CustomizeInputBox" size="10" maxlength="10" value="" onChange="window.changed = true;changeStyle('color', this, 'previewBodyStyle');" type="text">
   <img style="cursor: pointer; padding-left: 3px;" src="images/palette.gif" alt="label_text_palette" onClick="javascript: onClickPalette('bodyColor', this, false);"></td>
  <td><div id="previewBodyStyle" style="height: 18px; padding-left: 5px; font-family: arial;">Body Sample</div></td>
</tr>
</tbody>
</table>
<div style="padding-top: 10px; padding-bottom: 10px; font-weight: bold;">Note:
If this banner ad space does not have a direct ad campaign running, a
banner template will be used that will display text ads, thumbnail ads
and/or banner ads from our network.</div>
</div>
</td>
</tr>
</tbody>
</table>
<div style="text-align: right; padding-top: 10px;">
    <input id="dimensionChanged" name="dimension_changed" value="false" type="hidden" />
    <input name="Save" value="Save" class="yellow-button-small" type="submit" />
</div></td>
<td>&nbsp;</td>
<td style="width: 50%;">
    <table style="background-color: rgb(153, 153, 153); width: 100%;" cellpadding="3" cellspacing="1">
    <tbody>
      <tr>
        <td style="text-align: left; color: rgb(255, 255, 255); font-weight: bold;" class="sitename">Preview</td>
      </tr>
      <tr style="background-color: rgb(251, 251, 251);">
        <td>
            <div style="padding: 3px; text-align: left;">
            <div id="bannerPreview">
                <div><img id="bannerImage" style="border: 1px solid rgb(127, 157, 185); width: 120px; height: 240px;" src="images/ad_test_120x240.jpg" alt="Banner Test" height="240" width="120"></div>
            </div>
            </div>
        </td>
      </tr>
    </tbody>
    </table>
</td>
<?php
}
if($recAd['adspacetype']=='thumbnail'){   
?>
<td valign="top" align="center">
    <div id="colorlayer" onmouseover="javascript:enterColorPalette()" onmouseout="javascript:leaveColorPalette()" class="drag" style="visibility: hidden; width: 204px; height: 142px; position: absolute; z-index: 4;">
        <table bgcolor="#ffffff" border="0" cellpadding="1" cellspacing="2" width="100%">
        <tbody>
        <tr>
            <td id="selectedcolor" width="12%"></td>
            <td id="colorcode" align="center" width="75%"></td>
            <td width="12%">
                <div id="transparent" style="cursor: pointer; visibility: inherit;">
                <img src="images/transparent.gif" onmouseover="javascript:onTransparent();" onclick="javascript:onClickTransparent();preview();">
            </div>
            </td>
        </tr>
        </tbody>
        </table>
        <table id="colortable" style="border: 1px solid rgb(127, 157, 185); cursor: pointer; height: 115px;" bgcolor="#ffffff" border="0" cellpadding="1" cellspacing="2" width="100%">
        <tbody></tbody>
        </table>
        <iframe src="selling-gtb-adspace-add_files/blank_003.html" style="position: absolute; visibility: inherit; top: 0px; left: 0px; width: 204px; height: 142px; z-index: -1;" frameborder="0">
        </iframe>
    </div>
    <table width="100%" class="center" cellspacing="0" cellpadding="0" align="center">
    <tr>
    <td align="left" valign="top" >
    <form id="gtbLayout" name="gtb_layout" action="" method="post">
    <input id="themeId" name="theme_id" value="0" type="hidden">
    <table  align="center" width="100%" cellpadding="0" cellspacing="0">
    <tbody>
        <tr valign="top">
        <td style="width: 50%;">
        <table style="background-color: rgb(153, 153, 153); width: 100%;" cellpadding="3" cellspacing="1">
        <tbody>
        <tr>
            <td style="text-align: left; color: rgb(255, 255, 255); font-weight: bold;" class="sitename">Ad Space Characteristics</td>
        </tr>
        <tr style="background-color: rgb(251, 251, 251);">
        <td>
        <div style="padding: 3px; text-align: left;">
        <script type="text/javascript" language="javascript" src="js.html"></script>
        <script type="text/javascript" language="javascript" src="JavaScripts/form.js"></script>
        <table style="text-align: left;" class="normal-table" align="center">
        <tbody>
        <tr>
            <td colspan="2" class="blackbold" style="text-align: left;">
                Ad Space Type:
                <select id="adspaceType" name="adspace_type" class="flat blackbold" disabled>
                    <option value="thumbnail" selected="selected">Thumbnail</option>
                </select>
            </td>
        </tr>
        <tr>
          <td colspan="2" style="margin: 0px; padding: 0px;"><hr></td>
        </tr>
        <tr>
            <td colspan="2">
            <fieldset style="margin: 0px; padding: 0px;">
                <legend style="padding: 0px 5px; margin-left: 5px;">Components</legend>
                <table style="text-align: left; line-height: 18px;">
                <tbody>
                <tr>
                    <td>
                        <input id="component_handle" name="handle" checked="checked" onclick="javascript:isChanged = true;setComponent(this);" type="checkbox"><label style="cursor: pointer;" for="component_handle">Handle</label>
                    </td>
                    <td>
                        <input id="component_age" name="age" checked="checked" onclick="javascript:isChanged = true;setComponent(this);" type="checkbox"><label style="cursor: pointer;" for="component_age">Age</label>
                    </td>
                    <td>
                        <input id="component_location" name="location" checked="checked" onclick="javascript:isChanged = true;setComponent(this);" type="checkbox"><label style="cursor: pointer;" for="component_location">Location</label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <input id="component_headline" name="headline" checked="checked" onclick="javascript:isChanged = true;setComponent(this);" type="checkbox"><label style="cursor: pointer;" for="component_headline">Headline</label>
                    </td>
                    <td>
                        <input id="component_image" name="image" checked="checked" onclick="javascript:isChanged = true;setComponent(this);" type="checkbox"><label style="cursor: pointer;" for="component_image">Image</label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <input style="display: none;" id="component_header" name="header" checked="checked" onclick="javascript:isChanged = true;setComponent(this);" type="checkbox"><label style="cursor: pointer; display: none;" for="component_header">Header</label>
                    </td>
                    <td></td>
                </tr>
                </tbody>
                </table>
            </fieldset>
            </td>
        </tr>
        <tr>
            <td colspan="2"><hr></td>
        </tr>
        <tr>
            <td colspan="2">
                <fieldset>
                <legend style="padding: 0px 5px; margin-left: 5px;">Thumbs</legend>
                <div style="padding: 3px;">
                Size:
                    <select class="flat" id="thumbSize" name="thumb_size" onchange="javascript:isChanged = true;setImageSize(this.value);">
                        <option label="40x40" value="40x40">40x40</option>
                        <option label="60x60" value="60x60" selected="selected">60x60</option>
                        <option label="80x80" value="80x80">80x80</option>
                        <option label="100x100" value="100x100">100x100</option>
                        <option label="120x120" value="120x120">120x120</option>
                        <option label="140x140" value="140x140">140x140</option>
                        <option label="160x160" value="160x160">160x160</option>
                    </select>&nbsp;&nbsp;&nbsp;&nbsp;
                    View:
                    <select class="flat" id="thumbCount" name="thumb_count" onchange="javascript:isChanged = true;previewer.setCount(this.value);">
                        <option label="1" value="1">1</option>
                        <option label="2" value="2">2</option>
                        <option label="3" value="3">3</option>
                        <option label="4" value="4" selected="selected">4</option>
                        <option label="5" value="5">5</option>
                        <option label="6" value="6">6</option>
                        <option label="7" value="7">7</option>
                        <option label="8" value="8">8</option>
                        <option label="9" value="9">9</option>
                        <option label="10" value="10">10</option>
                    </select>
                </div>
                </fieldset>
            </td>
        </tr>
        <tr>
            <td colspan="2"><hr></td>
        </tr>
        <tr>
            <td colspan="2">
            <fieldset>
            <legend style="padding: 0px 5px; margin-left: 5px;">Thumbnail Size (pixels)</legend>
            <table style="width: 100%;">
            <tbody>
            <tr>
                <td>Width:</td>
                <td>
                    <input id="width" name="width" class="flat" value="264" style="width: 80px; color: rgb(128, 128, 128);" readonly="readonly" onkeyup="javascript:isChanged = true;setSize(gtbWidthInputElement.value, gtbHeightInputElement.value);" type="text">
                </td>
                <td>Height:</td>
                <td>
                    <input id="height" name="height" class="flat" value="212" style="width: 80px; color: rgb(128, 128, 128);" readonly="readonly" onkeyup="javascript:isChanged = true;setSize(gtbWidthInputElement.value, gtbHeightInputElement.value);" type="text">
                </td>
            </tr>
            <tr>
                <td colspan="4">
                    <input id="customGtbSize" name="custom_gtb_size" onclick="javascript:isChanged = true;enableCustomGtbSize(this);" type="checkbox">
                    <label style="cursor: pointer;" for="customGtbSize">Custom Thumbnail Size</label>
                </td>
            </tr>
            </tbody>
            </table>
            </fieldset>
            </td>
        </tr>
        <tr>
            <td colspan="2"><hr></td>
        </tr>
        <tr>
            <td>Background Color:</td>
            <td>
                <input id="backgroundColor" name="background_color" class="flat" size="10" maxlength="11" value="#80FF00" onchange="javascript: isChanged = true;commonPreview(preview);;" type="text"><a class="colorformat">Background Color</a>
                <img style="cursor: pointer; padding-left: 3px;" src="images/palette.gif" alt="Palette" onclick="javascript: onClickPalette('backgroundColor', this, true);">
            </td>
        </tr>
        <tr>
            <td>Orientation:</td>
            <td>
                <input id="horizontal" name="alignment" value="horizontal" checked="checked" onclick="javascript:isChanged = true;setView();" type="radio">
                <label style="cursor: pointer;" for="horizontal">Horizontal</label>
                <input id="vertical" name="alignment" value="vertical" onclick="javascript:isChanged = true;setView();" type="radio">
                <label style="cursor: pointer;" for="vertical">Vertical</label>
            </td>
        </tr>
        <tr>
            <td colspan="2"><hr></td>
        </tr>
        <tr>
            <td colspan="2">
            <fieldset>
            <legend>Thumbnail Appearance</legend>
            <table cellpadding="0" cellspacing="0" width="100%">
            <tbody>
            <tr>
                <td width="50%"></td>
                <td width="50%"></td>
            </tr>
            <tr>
                <td colspan="2">Click on banner or links below to control appearance.</td>
            </tr>
            <tr>
                <td>
                    <input type="hidden" name="insertmode" id="insertmode">
                    <span style="cursor: pointer;" onclick="javascript:popupStyleWindow('headerContentStyle','insertheader')"><img src="images/a-b.gif" alt="">&nbsp;Header</span>
                </td>
                <td>
                    <span style="cursor: pointer;" onclick="javascript:popupStyleWindow('bodyContentStyle','insertbody')"><img src="images/a-b.gif" alt="">&nbsp;Body</span>
                </td>
            </tr>
            </tbody>
            </table>
            </fieldset>
            </td>
        </tr>
        <tr>
            <td colspan="2" style="text-align: center;">
                <a href="javascript: restoreDefault(); void 0;">restore defaults</a>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <div>
                    <input id="allowNetwork" name="allow_network" checked="checked" onchange="javascript:isChanged = true;" onclick="checkSelect(this);" type="checkbox"><label style="padding-left: 5px;" for="allowNetwork" class="blackbold">Allow Network Ads</label>
                </div>
            </td>
        </tr>
        </tbody>
        </table>
        </div>
        </td>
        </tr>
        </tbody>
        </table>
        <div style="text-align: right; padding-top: 10px;">
            <input id="gtbAdSpace" name="gtb_adspace" value="" disabled="disabled" type="hidden">
            <input name="next" value="Save" class="yellow-button-small" onclick="javascript: return validateSite(); " type="submit">
        </div>
        </td>
        <td>&nbsp;</td>
        <td style="width: 50%;">
        <table style="background-color: rgb(153, 153, 153);" cellpadding="3" cellspacing="1" width="100%">
        <tbody>
        <tr>
            <td style="text-align: left; color: rgb(255, 255, 255); font-weight: bold;" class="sitename">Preview</td>
        </tr>
        <tr style="background-color: rgb(251, 251, 251);">
            <td>
            <div style="padding: 3px; text-align: left;">
            <div id="adPreBox">&nbsp;</div>
            <div>
                <div id="bodyContentStyle" style="display: none; position: absolute; width: 280px;">
                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tbody>
                    <tr>
                        <td style="width: 11px; height: 11px;"><img src="images/top-left.gif" alt=""></td>
                        <td style="width: 100%; background-image: url(images/top-mid.gif); background-repeat: repeat;"></td>
                        <td style="width: 11px;"><img src="images/top-right.gif" alt=""></td>
                    </tr>
                    <tr>
                        <td style="width: 11px; background-image: url(images/left-mid.gif); background-repeat: repeat;"></td>
                        <td style="background: rgb(249, 247, 247) none repeat scroll 0%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
                        <table width="100%">
                        <tbody>
                        <tr>
                            <td style="text-align: center;">Body Style Edit</td>
                            <td style="width: 16px;">
                            <img style="cursor: pointer;" src="images/closing-button.bmp" alt="" onclick="javascript:closeStyleWindow('bodyContentStyle')">
                            </td>
                        </tr>
                        </tbody>
                        </table>
                        <table style="text-align: left;">
                        <tbody>
                        <tr>
                            <td>Font Size:</td>
                            <td>
                                <select id="description_font_size" class="flat" name="description_font_size" onchange="javascript:isChanged = true;previewer.setStyle('body', 'fontSize', this.value+'px');">
                                    <option label="1" value="8">1</option>
                                    <option label="2" value="9">2</option>
                                    <option label="3" value="10">3</option>
                                    <option label="4" value="11">4</option>
                                    <option label="5" value="12">5</option>
                                    <option label="6" value="13" selected="selected">6</option>
                                    <option label="7" value="14">7</option>
                                    <option label="8" value="15">8</option>
                                    <option label="9" value="16">9</option>
                                    <option label="10" value="17">10</option>
                                </select> points
                            </td>
                        </tr>
                        <tr>
                            <td>Font Type:</td>
                            <td>
                                <select class="flat" id="description_font_type" name="description_font_type" onchange="javascript:isChanged = true;previewer.setStyle('body', 'fontFamily', this.value);">
                                    <option label="Arial" value="Arial" selected="selected">Arial</option>
                                    <option label="Georgia" value="Georgia">Georgia</option>
                                    <option label="Sans-serif" value="MS Sans Serif">Sans-serif</option>
                                    <option label="Times" value="Times">Times</option>
                                    <option label="Verdana" value="Verdana">Verdana</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>Color:</td>
                            <td>
                                <input id="description_font_color" name="description_font_color" class="flat" size="10" maxlength="10" value="#000000" onchange="javascript:isChanged = true;commonPreview(preview);" type="text"><a class="colorformat">Body Color</a>
                                <img style="cursor: pointer; padding-left: 3px;" src="images/palette.gif" alt="Palette" onclick="javascript:onClickPalette('description_font_color', this, false);">
                            </td>
                        </tr>
                        <tr>
                            <td>Attributes:</td>
                            <td>
                                <input id="description_bold" name="description_bold" size="25" value="Bold" onclick="javascript:isChanged = true;var value=this.checked?'bold':'normal'; previewer.setStyle('body', 'fontWeight', value);" type="checkbox">
                                <label style="cursor: pointer;" for="description_bold">Bold</label>
                                <input id="description_underline" name="description_underline" size="25" value="Underline" onclick="isChanged = true;var value=this.checked?'underline':'none'; previewer.setStyle('body', 'textDecoration', value);" type="checkbox">
                                <label style="cursor: pointer;" for="description_underline">Underline</label>
                                <input id="description_italic" name="description_italic" size="25" value="Italic" onclick="isChanged = true;var value=this.checked?'italic':'normal'; previewer.setStyle('body', 'fontStyle', value);" type="checkbox">
                                <label style="cursor: pointer;" for="description_italic">Italic</label>
                            </td>
                        </tr>
                        <tr>
                            <td>Horizontal Align:</td>
                            <td>
                                <select class="flat" id="description_align" name="description_align" onchange="javascript:isChanged = true;previewer.setStyle('body', 'textAlign', this.value);">
                                    <option value="left">Left</option>
                                    <option value="center" selected="selected">Center</option>
                                    <option value="right">Right</option>
                                </select>
                            </td>
                        </tr>
                        </tbody>
                        </table>
                        </td>
                        <td style="width: 11px; background-image: url(images/right-mid.gif); background-repeat: repeat;"></td>
                    </tr>
                    <tr>
                        <td style="height: 11px;"><img src="images/bottom-left.gif" alt=""></td>
                        <td style="width: 100%; background-image: url(images/bottom-mid.gif); background-repeat: repeat;"></td>
                        <td><img src="images/bottom-right.gif" alt=""></td>
                    </tr>
                    </tbody>
                    </table>
                </div>
                <div id="headerContentStyle" style="display: none; position: absolute; width: 280px;">
                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tbody>
                    <tr>
                        <td style="width: 11px; height: 11px;"><img src="images/top-left.gif" alt=""></td>
                        <td style="width: 100%; background-image: url(images/top-mid.gif); background-repeat: repeat;"></td>
                        <td style="width: 11px;"><img src="images/top-right.gif" alt=""></td>
                    </tr>
                    <tr>
                        <td style="width: 11px; background-image: url(images/left-mid.gif); background-repeat: repeat;"></td>
                        <td style="background: rgb(249, 247, 247) none repeat scroll 0%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
                        <table width="100%">
                        <tbody>
                        <tr>
                            <td style="text-align: center;">Header Style Edit</td>
                            <td style="width: 16px;">
                            <img style="cursor: pointer;" src="images/closing-button.bmp" alt="" onclick="javascript:closeStyleWindow('headerContentStyle')">
                            </td>
                        </tr>
                        </tbody>
                        </table>
                        <table style="text-align: left;">
                        <tbody>
                        <tr>
                            <td>Font Size:</td>
                            <td>
                                <select id="title_font_size" class="flat" name="title_font_size" onchange="javascript:isChanged = true;previewer.setStyle('head', 'fontSize', this.value+'px');">
                                    <option label="1" value="8">1</option>
                                    <option label="2" value="9">2</option>
                                    <option label="3" value="10">3</option>
                                    <option label="4" value="11">4</option>
                                    <option label="5" value="12">5</option>
                                    <option label="6" value="13">6</option>
                                    <option label="7" value="14">7</option>
                                    <option label="8" value="15" selected="selected">8</option>
                                    <option label="9" value="16">9</option>
                                    <option label="10" value="17">10</option>
                                </select> points
                            </td>
                        </tr>
                        <tr>
                            <td>Font Type:</td>
                            <td>
                                <select class="flat" id="title_font_type" name="title_font_type" onchange="javascript:isChanged = true;previewer.setStyle('head', 'fontFamily', this.value);">
                                    <option label="Arial" value="Arial" selected="selected">Arial</option>
                                    <option label="Georgia" value="Georgia">Georgia</option>
                                    <option label="Sans-serif" value="MS Sans Serif">Sans-serif</option>
                                    <option label="Times" value="Times">Times</option>
                                    <option label="Verdana" value="Verdana">Verdana</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>Color:</td>
                            <td>
                                <input id="title_font_color" name="title_font_color" class="flat" size="10" maxlength="10" value="#000000" onchange="javascript:isChanged = true;commonPreview(preview);" type="text"><a class="colorformat">Headline Color</a>
                                <img style="cursor: pointer; padding-left: 3px;" src="images/palette.gif" alt="Palette" onclick="javascript: onClickPalette('title_font_color', this, false);">
                            </td>
                        </tr>
                        <tr>
                            <td>Attributes:</td>
                            <td>
                                <input id="title_bold" name="title_bold" size="25" value="Bold" checked="checked" onclick="javascript:isChanged = true;var value=this.checked?'bold':'normal'; previewer.setStyle('head', 'fontWeight', value);" type="checkbox">
                                <label style="cursor: pointer;" for="title_bold">Bold</label>
                                <input id="title_underline" name="title_underline" size="25" value="Underline" onclick="isChanged = true;var value=this.checked?'underline':'none'; previewer.setStyle('head', 'textDecoration', value);" type="checkbox">
                                <label style="cursor: pointer;" for="title_underline">Underline</label>
                                <input id="title_italic" name="title_italic" size="25" value="Italic" onclick="isChanged = true;var value=this.checked?'italic':'normal'; previewer.setStyle('head', 'fontStyle', value);" type="checkbox">
                                <label style="cursor: pointer;" for="title_italic">Italic</label>
                            </td>
                        </tr>
                        <tr>
                            <td>Horizontal Align:</td>
                            <td>
                                <select class="flat" id="title_align" name="title_align" onchange="javascript:isChanged = true;previewer.setStyle('head', 'textAlign', this.value);">
                                    <option value="left">Left</option>
                                    <option value="center" selected="selected">Center</option>
                                    <option value="right">Right</option>
                                </select>
                            </td>
                        </tr>
                        </tbody>
                        </table>
                        </td>
                        <td style="width: 11px; background-image: url(images/right-mid.gif); background-repeat: repeat;"></td>
                    </tr>
                    <tr>
                        <td style="height: 11px;"><img src="images/bottom-left.gif" alt=""></td>
                        <td style="width: 100%; background-image: url(images/bottom-mid.gif); background-repeat: repeat;"></td>
                        <td><img src="images/bottom-right.gif" alt=""></td>
                    </tr>
                    </tbody>
                    </table>
                </div>
                <div id="brokerLinkStyle" style="display: none; position: absolute; width: 280px;">
                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tbody>
                    <tr>
                        <td style="width: 11px; height: 11px;"><img src="images/top-left.gif" alt=""></td>
                        <td style="width: 100%; background-image: url(images/top-mid.gif); background-repeat: repeat;"></td>
                        <td style="width: 11px;"><img src="images/top-right.gif" alt=""></td>
                    </tr>
                    <tr>
                        <td style="width: 11px; background-image: url(images/left-mid.gif); background-repeat: repeat;"></td>
                        <td style="background: rgb(249, 247, 247) none repeat scroll 0%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
                        <table width="100%">
                        <tbody>
                        <tr>
                            <td style="text-align: center;">Broker Link Style Edit</td>
                            <td style="width: 16px;">
                            <img style="cursor: pointer;" src="images/closing-button.bmp" alt="" onclick="javascript:closeStyleWindow('brokerLinkStyle')">
                            </td>
                        </tr>
                        </tbody>
                        </table>
                        <table style="text-align: left;">
                        <tbody>
                        <tr>
                            <td>Font Size:</td>
                            <td>
                                <select id="broker_link_font_size" class="flat" name="broker_link_font_size" onchange="javascript:isChanged = true;previewer.setStyle('brokerLink', 'fontSize', this.value+'px');">
                                    <option label="1" value="8">1</option>
                                    <option label="2" value="9">2</option>
                                    <option label="3" value="10">3</option>
                                    <option label="4" value="11" selected="selected">4</option>
                                    <option label="5" value="12">5</option>
                                    <option label="6" value="13">6</option>
                                    <option label="7" value="14">7</option>
                                    <option label="8" value="15">8</option>
                                    <option label="9" value="16">9</option>
                                    <option label="10" value="17">10</option>
                                </select> points
                            </td>
                        </tr>
                        <tr>
                            <td>Font Type:</td>
                            <td>
                                <select class="flat" id="broker_link_font_type" name="broker_link_font_type" onchange="javascript:isChanged = true;previewer.setStyle('brokerLink', 'fontFamily', this.value);">
                                    <option label="Arial" value="Arial" selected="selected">Arial</option>
                                    <option label="Georgia" value="Georgia">Georgia</option>
                                    <option label="Sans-serif" value="MS Sans Serif">Sans-serif</option>
                                    <option label="Times" value="Times">Times</option>
                                    <option label="Verdana" value="Verdana">Verdana</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>Color:</td>
                            <td>
                                <input id="broker_link_font_color" name="broker_link_font_color" class="flat" size="10" maxlength="10" value="#000000" onchange="javascript:isChanged = true;commonPreview(preview);" type="text"><a class="colorformat">Broker Link Color</a>
                                <img style="cursor: pointer; padding-left: 3px;" src="images/palette.gif" alt="Palette" onclick="javascript: onClickPalette('broker_link_font_color', this, false);">
                            </td>
                        </tr>
                        <tr>
                            <td>Attributes:</td>
                            <td>
                                <input id="broker_link_bold" name="broker_link_bold" size="25" value="Bold" onclick="javascript:isChanged = true;var value=this.checked?'bold':'normal'; previewer.setStyle('brokerLink', 'fontWeight', value);" type="checkbox">
                                <label style="cursor: pointer;" for="broker_link_bold">Bold</label>
                                <input id="broker_link_underline" name="broker_link_underline" size="25" value="Underline" onclick="javascript:isChanged = true;var value=this.checked?'underline':'none'; previewer.setStyle('brokerLink', 'textDecoration', value);" type="checkbox">
                                <label style="cursor: pointer;" for="broker_link_underline">Underline</label>
                                <input id="broker_link_italic" name="broker_link_italic" size="25" value="Italic" onclick="javascript:isChanged = true;var value=this.checked?'italic':'normal'; previewer.setStyle('brokerLink', 'fontStyle', value);" type="checkbox">
                                <label style="cursor: pointer;" for="broker_link_italic">Italic</label>
                            </td>
                        </tr>
                        <tr>
                            <td>Horizontal Align:</td>
                            <td>
                                <select class="flat" id="broker_link_align" name="broker_link_align" onchange="javascript:isChanged = true;previewer.setStyle('brokerLink', 'textAlign', this.value);">
                                    <option value="left">Left</option>
                                    <option value="center" selected="selected">Center</option>
                                    <option value="right">Right</option>
                                </select>
                            </td>
                        </tr>
                        </tbody>
                        </table>
                        </td>
                        <td style="width: 11px; background-image: url(images/right-mid.gif); background-repeat: repeat;"></td>
                    </tr>
                    <tr>
                        <td style="height: 11px;"><img src="images/bottom-left.gif" alt=""></td>
                        <td style="width: 100%; background-image: url(images/bottom-mid.gif); background-repeat: repeat;"></td>
                        <td><img src="images/bottom-right.gif" alt=""></td>
                    </tr>
                    </tbody>
                    </table>
                </div>
            </div>
            <div style="margin-top: 10px;">Please Note: Click on a specific property to edit it.</div>
            </div>
            </td>
        </tr>
        </tbody>
        </table>
        </td>
    </tr>
    </tbody>
    </table>
    </form>
    </td>
    </tr>
    </table>
</td>

<?php
}
?>